home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / cucd / programming / oberonv4 / source / system / modules.mod (.txt) < prev    next >
Oberon Text  |  1996-04-24  |  1KB  |  36 lines

  1. Syntax10.Scn.Fnt
  2. ParcElems
  3. Alloc
  4. Syntax24b.Scn.Fnt
  5. (* AMIGA *)
  6. MODULE Modules; (* 7-Aug-1993/cn *)
  7. IMPORT
  8.  SYSTEM, Amiga, Kernel;
  9. CONST
  10.  ModNameLen*=Kernel.ModNameLength;
  11.  Command*=PROCEDURE();
  12.  Module*=Kernel.Module;
  13.  ModuleName*=Kernel.ModuleName;
  14.  importing*,imported*:ModuleName;
  15.  res*:INTEGER;
  16. PROCEDURE ThisMod*(name:ARRAY OF CHAR):Module;
  17.     mod:Module;
  18. BEGIN
  19.     COPY(name,importing);
  20.     Amiga.ThisMod(
  21.         name,SYSTEM.VAL(LONGINT,mod),res,SYSTEM.VAL(LONGINT,Kernel.modules),imported
  22.     IF res#0 THEN mod:=NIL; END;  (* << CN *)
  23.     RETURN mod;
  24. END ThisMod;
  25. PROCEDURE ThisCommand*(mod:Module; name:ARRAY OF CHAR):Command;
  26.  cmd:Command;
  27. BEGIN
  28.  Amiga.ThisCommand(SYSTEM.VAL(LONGINT,mod),name,SYSTEM.VAL(LONGINT,cmd),res);
  29.  RETURN cmd;
  30. END ThisCommand;
  31. PROCEDURE Free*(name:ARRAY OF CHAR; all:BOOLEAN);
  32. BEGIN
  33.  Amiga.Free(name,all,res,SYSTEM.VAL(LONGINT,Kernel.modules));
  34. END Free;
  35. END Modules.
  36.